<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="MATLAB R2016a"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><title>Current_Sensor_Scaler_Block</title><style type="text/css">
* {margin: 0; padding: 0;}
body {text-align: start; line-height: 17.2339992523193px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Consolas, Inconsolata, Menlo, monospace; font-style: normal; font-size: 14px; font-weight: normal; text-decoration: none; white-space: normal; }
h1, h2 {font-weight: normal;}
.content { padding: 30px; }

.S0 { margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S1 { line-height: 26.3999996185303px; min-height: 24px; white-space: pre-wrap; color: rgb(213, 80, 0); font-family: Helvetica, Arial, sans-serif; font-size: 22px; white-space: pre-wrap; margin-left: 4px; margin-top: 3px; margin-bottom: 15px; margin-right: 10px;  }
.S2 { min-height: 0px; margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S3 { line-height: 21px; min-height: 17px; white-space: pre-wrap; font-family: Helvetica, Arial, sans-serif; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px;  }
.S4 { line-height: 20.576000213623px; min-height: 20px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: bold; white-space: pre-wrap; margin-left: 4px; margin-top: 15px; margin-bottom: 9px; margin-right: 10px;  }
.S5 { font-family: Helvetica, Arial, sans-serif; margin-left: 0px; margin-top: 10px; margin-bottom: 20px; margin-right: 0px;  }
.S6 { text-align: left; line-height: 21px; white-space: pre-wrap; white-space: pre-wrap; margin-left: 56px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S7 { font-weight: bold; margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S8 { text-align: center; line-height: 20.576000213623px; min-height: 20px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: bold; white-space: pre-wrap; margin-left: 4px; margin-top: 15px; margin-bottom: 9px; margin-right: 10px;  }
.S9 { text-align: center; line-height: 21px; min-height: 17px; white-space: pre-wrap; font-family: Helvetica, Arial, sans-serif; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px;  }
.S10 { line-height: 20.576000213623px; min-height: 20px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: bold; white-space: pre-wrap; margin-left: 4px; margin-top: 3px; margin-bottom: 9px; margin-right: 10px;  }

.LineNodeBlock {margin: 10px 0 10px 0; background-color: #F7F7F7;}
.LineNodeBlock+.paragraphNode {margin-top: 10px;}
.lineNode {padding-left: 10px; border-left: 1px solid #E9E9E9; border-right: 1px solid #E9E9E9;}
.inlineWrapper:first-child .lineNode,.inlineWrapper.outputs+.inlineWrapper .lineNode {padding-top: 5px; border-top: 1px solid #E9E9E9;}
.inlineWrapper:last-child .lineNode,.inlineWrapper.outputs .lineNode {padding-bottom: 5px; border-bottom: 1px solid #E9E9E9;}
.lineNode .textBox {white-space: pre;}
</style></head><body><div class = "content"><div class = 'SectionBlock containment active'><h1 class = "S1"><span class = "S2">Current_Sensor_Scaler_Block</span></h1><div class = "S3"><span class = "S2">Convert motor's real current into a scale which we use in control.</span></div><div class = "S3"><span class = "S2"></span></div><h2 class = "S4"><span class = "S2"># Model</span></h2><ul class = "S5"><li class = "S6"><span class = "S7">Looks</span></li></ul><h2 class = "S8"><img class="imageNode" width="282" height="174" style="vertical-align: baseline" src=""></h2><div class = "S3"><span class = "S2"></span></div><ul class = "S5"><li class = "S6"><span class = "S7">Inside  of  the model</span></li></ul><div class = "S9"><img class="imageNode" width="700" height="249" style="vertical-align: baseline" src=""></div><h2 class = "S4"><span class = "S2"># Parameter</span></h2><ul class = "S5"><li class = "S6"><span class = "S7">R_sample(ohm)</span><span class = "S0">: the sampling resistance.</span></li><li class = "S6"><span class = "S7">Adc_Range</span><span class = "S0">: the ADC Range.</span></li><li class = "S6"><span class = "S7">Amplifier_Gain(V/V)</span><span class = "S0">: the Gain of the Amplifier.</span></li><li class = "S6"><span class = "S7">Vref(V)</span><span class = "S0">: the reference voltage of ADC.</span></li><li class = "S6"><span class = "S7">Ia_offset(0~4095)</span><span class = "S0">: the current offset of ADC.</span></li><li class = "S6"><span class = "S7">Ib_offset(0~4095)</span><span class = "S0">: the current offset of ADC.</span></li></ul><h2 class = "S4"><span class = "S2"># Description</span></h2><ul class = "S5"><li class = "S6"><span class = "S7">Equation</span><span class = "S0">:</span></li></ul><div class = "S3"><span class = "S2">                Ia_sample = (Ia_real_in * R_sample * Amplifier_Gain);</span></div><div class = "S3"><span class = "S2">                Ia_ctrl = Ia_sample * (Adc_Range/Vref)  * (2/Adc_Range) * (3.0/3.3);</span></div><div class = "S3"><span class = "S2">                Ib_sample = (Ib_real_in * R_sample * Amplifier_Gain);</span></div><div class = "S3"><span class = "S2">                Ib_ctrl = Ib_sample * (Adc_Range/Vref)  * (2/Adc_Range) * (3.0/3.3);</span></div><div class = "S3"><span class = "S2">              </span></div><ul class = "S5"><li class = "S6"><span class = "S7">input</span><span class = "S0">:   </span></li></ul><div class = "S3"><span class = "S2">                [Ia_real_in]: The real current of A phase of the Motor.</span></div><div class = "S3"><span class = "S2">                [Ib_real_in]: The real current of B phase of the Motor.</span></div><ul class = "S5"><li class = "S6"><span class = "S7">output</span><span class = "S0">:</span></li></ul><div class = "S3"><span class = "S2">                [Ia_ctrl]:Scaling-down current of the Ia_real_in.We use it in control.</span></div><div class = "S3"><span class = "S2">                [Ib_ctrl]:Scaling-down current of the Ib_real_in.We use it in control.</span></div></div><div class = "S0"></div><div class = 'SectionBlock containment'><h2 class = "S10"><span class = "S2"></span></h2></div></div>
<!-- 
##### SOURCE BEGIN #####
%% Current_Sensor_Scaler_Block
% Convert motor's real current into a scale which we use in control.
% 
% 
%% # Model
% * *Looks*
%% 
% 
% 
% * *Inside  of  the model*
% 
% 
%% # Parameter
% * *R_sample(ohm)*: the sampling resistance.
% * *Adc_Range*: the ADC Range.
% * *Amplifier_Gain(V/V)*: the Gain of the Amplifier.
% * *Vref(V)*: the reference voltage of ADC.
% * *Ia_offset(0~4095)*: the current offset of ADC.
% * *Ib_offset(0~4095)*: the current offset of ADC.
%% # Description
% * *Equation*:
% 
%                 Ia_sample = (Ia_real_in * R_sample * Amplifier_Gain);
% 
%                 Ia_ctrl = Ia_sample * (Adc_Range/Vref)  * (2/Adc_Range) 
% * (3.0/3.3);
% 
%                 Ib_sample = (Ib_real_in * R_sample * Amplifier_Gain);
% 
%                 Ib_ctrl = Ib_sample * (Adc_Range/Vref)  * (2/Adc_Range) 
% * (3.0/3.3);
% 
%               
% 
% * *input*:   
% 
%                 [Ia_real_in]: The real current of A phase of the Motor.
% 
%                 [Ib_real_in]: The real current of B phase of the Motor.
% 
% * *output*:
% 
%                 [Ia_ctrl]:Scaling-down current of the Ia_real_in.We use 
% it in control.
% 
%                 [Ib_ctrl]:Scaling-down current of the Ib_real_in.We use 
% it in control.
%%
##### SOURCE END #####
--></body></html>